package service;

import org.apache.ibatis.session.SqlSession;
import org.springframework.web.bind.annotation.RequestParam;


import util.MybatisSessionFactory;
import dao.LogDao;


public class UserLogService {
	SqlSession sql=MybatisSessionFactory.getSqlSession();
	LogDao dao=sql.getMapper(LogDao.class);
    public void adduser_log( 
    		@RequestParam(value="user_id",defaultValue="")String user_id,
    		@RequestParam(value="id",defaultValue="")String id,
  	        @RequestParam(value="operation",defaultValue="")String operation){
    	    dao.adduser_log(user_id,id,operation);
    	    sql.commit();
    }
    public void addfile( 
    		
    		@RequestParam(value="id",defaultValue="")String id,
  	        @RequestParam(value="name",defaultValue="")String name){
    	    dao.addfile(id,name);
    	    sql.commit();
    }
}
